home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / bin / isexpand < prev    next >
Text File  |  1995-06-23  |  764b  |  34 lines

  1. #!/bin/sh
  2. #
  3. #    Expand the suffix flags in a list of ispell words.
  4. #
  5. #    Usage:
  6. #
  7. #    isexpand [ file ] ...
  8. #
  9. #    All suffixes in the given input files (standard input if none) are
  10. #    expanded.  The output is sorted with sort -u to remove possible
  11. #    duplications.
  12. #
  13. #        Geoff Kuenning
  14. #        5/17/87
  15. #
  16. LIBDIR=/usr/skunk/lib/ispell-2.0.02
  17. EXPAND1=${LIBDIR}/isexp1.sed
  18. EXPAND2=${LIBDIR}/isexp2.sed
  19. EXPAND3=${LIBDIR}/isexp3.sed
  20. EXPAND4=${LIBDIR}/isexp4.sed
  21.  
  22. #
  23. # We have to test $# because of a bug in the way /bin/sh expands "$@" when
  24. # there are no arguments.
  25. #
  26. if [ $# -eq 0 ]
  27. then
  28.     sed -f $EXPAND1 | sed -f $EXPAND2 \
  29.       | sed -f $EXPAND3 | sed -f $EXPAND4 | sort -u
  30. else
  31.     sed -f $EXPAND1 "$@" | sed -f $EXPAND2 \
  32.       | sed -f $EXPAND3 | sed -f $EXPAND4 | sort -u
  33. fi
  34.